package com.huat.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

//扩展Spring MVC
@Configuration
public class MyMvcConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("login");
        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/index.html").setViewName("index");
        registry.addViewController("/houtai").setViewName("studentInfo");
        registry.addViewController("/studentInfo.html").setViewName("studentInfo");
        registry.addViewController("/revise").setViewName("reviseStudentInfo");
        registry.addViewController("/table.html").setViewName("table");
        registry.addViewController("/info.html").setViewName("info");
    }
}
